package com.CampusLife.service.impl;

import  com.CampusLife.bean.ProductComment;
import  com.CampusLife.dao.IProductCommentDao;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import  com.CampusLife.service.IProductCommentService;

import javax.annotation.Resource;
import java.util.List;

@Service
@Transactional
public class ProductCommentServiceImpl implements IProductCommentService {
    @Resource
    private IProductCommentDao iProductCommentDao;

    @Override
    public List<ProductComment> queryAll() {
        return iProductCommentDao.queryAll();
    }

    @Override
    public  List<ProductComment> queryById(Integer pid){
        return iProductCommentDao.queryById(pid);
    }

    @Override
    public void add(ProductComment productComment){iProductCommentDao.add(productComment);
    }

    @Override
    public void update(ProductComment productComment) {

        iProductCommentDao.update(productComment);
    }

    @Override
    public void delete(Integer cid) {
        iProductCommentDao.delete(cid);
    }
}
